<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <script src="1.js"></script>
  </head>
  <body>
    <button id="abc">submit</button>
  </body>
  <script>
    let button = document.querySelector('button')

    function handle(a, b, c) {
      // console.log(this)
      console.log(a, b, c)
    }

    button.addEventListener('click', function callback() {
      // console.log(this)
      //bind 只是运行时缓存，不会立刻执行函数
      // handle.bind(this)()
      //call/apply立刻执行
      // handle.call(this, 1, 2, 3)
      // handle.apply(this, [1, 2, 3])
      ;(() => {
        console.log(this)
      })()
    })

    //   let bool = new Boolean(true)
    //   console.log(bool)
    //   let n = new Number(34)
    //   console.log(n)
    //   let s = new String('abc')
    //   let s = 'abc'
    //   console.log(s.substr(0, 1))
  </script>
</html>
